function [precision, recall, accuracy] = computePrecisionRecall(prediction, groundtruth)

TP = sum((prediction ==groundtruth &  groundtruth == 1));
TN = sum((prediction ==groundtruth &  groundtruth == -1));
FP = sum((prediction ~= groundtruth &  prediction == 1));
FN = sum((prediction ~= groundtruth &  prediction == -1));

accuracy = (TP+TN)/(TP+TN+FP+FN);
precision = TP/(TP+FP);
recall = TP/(TP+FN);
